from selenium.webdriver.common.by import By

"""
平台登录
"""
# 用户名
web_login_username = By.CSS_SELECTOR, "[name='username']"
# 密码
web_login_pwd = By.CSS_SELECTOR, "[name='password']"
# 登录
web_login_btn = By.CSS_SELECTOR, ".btn-primary"
# 名称
web_name = By.CSS_SELECTOR, "body > div.wrapper > aside > section > div > div.pull-left.info > p"

"""
收卡-平台顶部功能栏
"""
# 余额
web_sk_top_ye = By.CSS_SELECTOR, ".balance-box"
# 授信余额
web_sk_top_sxye = By.CSS_SELECTOR, ".credit-balance-box"
# 转账码
web_sk_top_zzm = By.XPATH, '(//button[@class="btn btn-sm btn-success"])[3]'
# 转账
web_sk_top_zz = By.XPATH, "(//a[contains(text(),'转账')])[1]"
# 刷新
web_sk_top_sx = By.XPATH, "(//i[@class='fa fa-refresh'])[1]"
# 头像
web_sk_top_tx = By.XPATH, "(//img[@class='user-image'])[1]"
# 设置
web_sk_top_sz = By.CSS_SELECTOR, ".user-footer>div>a"
# 登出
web_sk_top_dc = By.CSS_SELECTOR, ".user-footer>div:nth-child(2)>a"
# 转账码弹窗
web_sk_top_zzmtc = By.XPATH, '//*[@id="swal2-title"]'
# 公司名称+角色
web_sk_top_gsmc_js = By.XPATH, '/html/body/div[1]/header/a/span[2]'
# 转账码确认
web_sk_top_zzmqr = By.CSS_SELECTOR, 'body > div.swal2-container.swal2-center.swal2-fade.swal2-shown > div > div.swal2-actions > button.swal2-confirm.swal2-styled'

"""
收卡-转账页面
"""
# 获取文本输入框
web_sk_top_sr = By.XPATH, "//input[@type='text']"
# 收款人转账码
web_sk_top_skrzzm = By.XPATH, "//*[@id='transfer-money']/form/div[1]/div/div/input"
# 收款人
web_sk_top_skr = By.XPATH, "//*[@id='transfer-money']/form/div[2]/div"
# 金额
web_sk_top_je = By.XPATH, '//*[@id="transfer-money"]/form/div[2]/div/div[1]/input'
# 金额错误提示
web_sk_top_jecw = By.XPATH, '//*[@id="transfer-money"]/form/div[2]/div/div[2]'
# 备注
web_sk_top_bz = By.XPATH, '//*[@id="transfer-money"]/form/div[4]/div/div/input'
# 立即转账
web_sk_top_ljzz = By.XPATH, '//span[text()="立即转账"]'
# 弹窗
web_sk_top_zztc = By.CSS_SELECTOR, '.el-message__content'
# 转账文字，用于失焦
web_sk_top_zzwz = By.XPATH, '//*[@id="app"]/section[1]/h1'
# 转账确定
web_sk_top_zzqd = By.XPATH, '//div[@aria-label="提示"]//span[contains(text(),"确定")]'
# 转账截图
web_sk_top_zzjt = By.XPATH, "//div[@class='el-upload__text']"

"""
收卡-充值页面
"""
# 去充值
web_sk_top_qcz = By.XPATH, "//ul[@class='nav navbar-nav']//a[@class='btn btn-sm btn-primary recharge_button'][contains(text(),'去充值')]"


# 充值银行
def create_web_sk_top_cz_selector(yhm):
    return By.XPATH, f"//div[contains(text(),'{yhm}')]"


# 充值金额
web_sk_top_czje = By.XPATH, "//label[contains(text(),'充值金额')]"
# 输入金额
web_sk_top_srje = By.XPATH, "//label[contains(text(),'充值金额')]/../div/input"
# 创建充值
web_sk_top_cjcz = By.XPATH, "//button[contains(text(),'创建新充值')]"
# 备注
web_sk_top_czbz = By.XPATH, "//label[contains(text(),'备注')]"
# 输入备注
web_sk_top_srbz = By.XPATH, "//label[contains(text(),'备注')]/../div/input"
# 充值图片
web_sk_top_cztp = By.XPATH, "//p[contains(text(),'将文件拖到此处，或点击此区域后粘贴图片')]"
# 确认上传
web_sk_top_qrsc = By.XPATH, "//button[contains(text(),'确认完成上传')]"
# 打款成功
web_sk_top_dkcg = By.XPATH, "//div[contains(text(),'您已经打款，请等待平台确认入账')]"

"""
收卡-用户设置编辑页面
"""
# 用户名
web_sk_top_yhm = By.XPATH, '//*[@id="app"]/section[2]/div/div/div/form/div[1]/div/div/div[1]/div/div/div'
# 名称
web_sk_top_mc = By.XPATH, '//*[@id="name"]'
# 头像

# 密码
web_sk_top_mm = By.XPATH, '//*[@id="password"]'
# 确认密码
web_sk_top_qrmm = By.XPATH, '//*[@id="password_confirmation"]'
# 提交
web_sk_top_tj = By.XPATH, '//*[@id="app"]/section[2]/div/div/div/form/div[2]/div[2]/div[1]/button'

# 弹窗
web_sk_top_sztc = By.CSS_SELECTOR, '.toast-message'

"""
收卡-总览
"""
# 总览
web_sk_zl_zl = By.XPATH, '//span[contains(text(),"总览")]'
# 公司名字
web_sk_zl_gsmz = By.XPATH, '//*[@id="app"]/section[1]/h1'
# 余额
web_sk_zl_ye = By.XPATH, '//*[@id="app"]/section[2]/div[1]/div/div/div[2]/div/div[1]'
# 本日收卡总额
web_sk_zl_d1 = By.XPATH, '//*[@id="app"]/section[2]/div[2]/div[1]/div/div[1]/h3'
# 本月收卡总额
web_sk_zl_d2 = By.XPATH, '//*[@id="app"]/section[2]/div[2]/div[2]/div/div[1]/h3'
# 本日收卡总数
web_sk_zl_d3 = By.XPATH, '//*[@id="app"]/section[2]/div[2]/div[3]/div/div[1]/h3'
# 本月收卡总数
web_sk_zl_d4 = By.XPATH, '//*[@id="app"]/section[2]/div[2]/div[4]/div/div[1]/h3'

"""
收卡-人员管理
"""
# 跳转人员管理
web_sk_pm_rygl = By.XPATH, '//span[contains(text(),"人员管理")]'
# 新增
web_sk_pm_xz = By.XPATH, '//*[@id="app"]/section[2]/div/div/div/div[1]/div[1]/div[2]/a/span'
# 快速创建
web_sk_pm_kscj = By.XPATH, '//span[@class="create"]'
# 快速提交
web_sk_pm_kstj = By.XPATH, '//button[@class="btn btn-primary btn-sm"]'
# 编辑
web_sk_pm_bj = By.XPATH, '//a[text()="编辑"][1]'
# 显示
web_sk_pm_xs = By.XPATH, '//a[text()="显示"][1]'
# 删除
web_sk_pm_sc = By.XPATH, '//a[text()="删除"][1]'
# 用户名
web_sk_pm_username = By.CSS_SELECTOR, '#username'
# 名称
web_sk_pm_name = By.CSS_SELECTOR, '#name'
# 密码
web_sk_pm_pwd = By.CSS_SELECTOR, '#password'
# 角色
web_sk_pm_js = By.XPATH, "//span[@class='select2-selection__placeholder']"
# 卡商公司-员工
web_sk_pm_yg = By.XPATH, "//span[@class='select2-results']//li[contains(text(),'卡商公司-员工')]"
# 状态
web_sk_pm_zt = By.XPATH, '//*[@id="app"]/section[2]/div/div/div/form/div[1]/div/div/div[5]/div/div/div/span[1]'
# 新增提交
web_sk_pm_xztj = By.XPATH, '//button[text()="提交"]'
# 成功弹窗
web_sk_pm_cgtc = By.CSS_SELECTOR, '.toast-message'
# 编辑提交
web_sk_pm_bjtj = By.XPATH, '//button[text()="提交"]'
# 用户名_快速
web_sk_pm_usernameks = By.CSS_SELECTOR, '#name'
# 名称_快速
web_sk_pm_nameks = By.CSS_SELECTOR, '#username'
# 密码_快速
web_sk_pm_pwdks = By.CSS_SELECTOR, '#password'
# 角色_快速
web_sk_pm_jsks = By.XPATH, '//select[@name="roles"]'
# 页面总记录条数
web_sk_pm_total = By.XPATH, '//*[@id="app"]/section[2]/div/div/div/div[3]/b[3]'
# 用户名提示
web_sk_pm_usernamets = By.XPATH, '//*[@id="app"]/section[2]/div/div/div/form/div[1]/div/div/div[1]/div/label'
# 名称提示
web_sk_pm_namets = By.XPATH, '//*[@id="app"]/section[2]/div/div/div/form/div[1]/div/div/div[2]/div/label'
# 密码提示
web_sk_pm_pwdts = By.XPATH, '//*[@id="app"]/section[2]/div/div/div/form/div[1]/div/div/div[3]/div/label'
# 操作按钮
web_sk_pm_cz = By.XPATH, '//i[@class="fa fa-ellipsis-v"][1]'
# 删除提交按钮
web_sk_pm_sctj = By.XPATH, '//button[@class="swal2-confirm swal2-styled"]'
# 删除ok
web_sk_pm_scok = By.XPATH, '//button[@class="swal2-confirm swal2-styled"]'
# 删除成功
web_sk_pm_sccg = By.XPATH, '//*[@id="swal2-title"]'

"""
收卡-汇率管理
"""
# 汇率管理
web_sk_hl_hlgl = By.XPATH, '//span[contains(text(),"汇率管理")]'
# 卡种列表
web_sk_hl_kzlb = By.XPATH, "//tbody/tr/td[1]/div[@class='cell']"
# 卡种
web_sk_hl_kz = By.XPATH, '//*[@id="company-card-rate"]/div[1]/form/div[1]/div/div/div/input'
# t-Steam
web_sk_hl_tSteam = By.XPATH, '//span[contains(text(), "t-Steam")]'
# 国家
web_sk_hl_gj = By.XPATH, '//*[@id="company-card-rate"]/div[1]/form/div[2]/div/div/div[1]/input'
# 美国
web_sk_hl_mg = By.XPATH, '//span[contains(text(), "US美国")]'
# 速度快
web_sk_hl_sdk = By.XPATH, '//*[@id="company-card-rate"]/div[1]/form/div[3]/div/div/label[2]/span'
# 新增
web_sk_hl_xz = By.XPATH, '//*[@id="company-card-rate"]/div[1]/form/div[5]/div/button/span'
# 金额类型1
web_sk_hl_je1 = By.XPATH, '//span[@class="el-input__suffix"]'
# 下拉箭头
web_sk_hl_xl = By.XPATH, '//span[@class="el-input__suffix"]'
# 输入框
web_sk_hl_sr = By.XPATH, '//input[@type="text"]'
# 固定面值1
web_sk_hl_gd1 = By.XPATH, '//span[contains(text(),"固定面值")]'
# 范围1
web_sk_hl_fw1 = By.XPATH, '//*[@id="company-card-rate"]/div[2]/div[3]/table/tbody/tr[2]/td/div[1]/form/div/div[3]/table/tbody/tr/td[2]/div/div/input'
# 汇率1
web_sk_hl_hl1 = By.XPATH, '//*[@id="company-card-rate"]/div[2]/div[3]/table/tbody/tr[2]/td/div[1]/form/div/div[3]/table/tbody/tr/td[3]/div/div/input'
# 保存
web_sk_hl_bc = By.XPATH, '//span[contains(text(),"保存")]'
# 提示文字
web_sk_hl_ts = By.CSS_SELECTOR, '#swal2-content'
# 提示ok
web_sk_hl_tsok = By.XPATH, '//button[contains(text(), "OK")]'
# 保存成功
web_sk_hl_bccg = By.XPATH, '//*[@id="swal2-title"]'
# 保存ok
web_sk_hl_bcok = By.XPATH, '//button[contains(text(), "OK")]'
# 添加
web_sk_hl_tj = By.XPATH, '//span[contains(text(),"添加")]'
# 金额类型2
web_sk_hl_je2 = By.XPATH, '//*[@id="company-card-rate"]/div[2]/div[3]/table/tbody/tr[2]/td/div[1]/form/div/div[3]/table/tbody/tr[2]/td[1]/div/div/div[1]/span/span/i'
# 面值区间
web_sk_hl_mzqj = By.XPATH, '//span[contains(text(),"面值区间")]'
# 区间选择
web_sk_hl_qjxz = By.XPATH, '//*[@id="company-card-rate"]/div[2]/div[3]/table/tbody/tr[2]/td/div[1]/form/div/div[3]/table/tbody/tr[2]/td[2]/div/div/div[1]/span/span/i'
# 区间100-2000
web_sk_hl_qj = By.XPATH, '//span[contains(text(), "100-200")]'
# 汇率2
web_sk_hl_hl2 = By.XPATH, '//*[@id="company-card-rate"]/div[2]/div[3]/table/tbody/tr[2]/td/div[1]/form/div/div[3]/table/tbody/tr[2]/td[3]/div/div/input'
# 金额类型3
web_sk_hl_je3 = By.XPATH, '//*[@id="company-card-rate"]/div[2]/div[3]/table/tbody/tr[2]/td/div[1]/form/div/div[3]/table/tbody/tr[3]/td[1]/div/div/div[1]/span/span/i'
# 碎卡
web_sk_hl_sk = By.XPATH, '//span[contains(text(), "碎卡")]'
# 汇率3
web_sk_hl_hl3 = By.XPATH, '//*[@id="company-card-rate"]/div[2]/div[3]/table/tbody/tr[2]/td/div[1]/form/div/div[3]/table/tbody/tr[3]/td[3]/div/div/input'
# 金额类型4
web_sk_hl_je4 = By.XPATH, '//*[@id="company-card-rate"]/div[2]/div[3]/table/tbody/tr[2]/td/div[1]/form/div/div[3]/table/tbody/tr[4]/td[1]/div/div/div[1]/span/span/i'
# 倍数
web_sk_hl_bs = By.XPATH, '//span[contains(text(), "倍数")]'
# 范围4
web_sk_hl_fw4 = By.XPATH, '//*[@id="company-card-rate"]/div[2]/div[3]/table/tbody/tr[2]/td/div[1]/form/div/div[3]/table/tbody/tr[4]/td[2]/div/div/input'
# 汇率4
web_sk_hl_hl4 = By.XPATH, '//*[@id="company-card-rate"]/div[2]/div[3]/table/tbody/tr[2]/td/div[1]/form/div/div[3]/table/tbody/tr[4]/td[3]/div/div/input'
# 删除
web_sk_hl_sc = By.XPATH, "//tr[contains(td/div/text(), 't-Steam')]/td//i[@class='el-icon-delete']"
# 删除确定
web_sk_hl_scqd = By.XPATH, "(//span[contains(text(),'确定')])[1]"
# 状态
web_sk_hl_zt = By.XPATH, '//span[@class="el-switch__core"]'

"""
收卡-接卡
"""
# 收卡中心
web_sk_skzx = By.XPATH, '//span[contains(text(),"收卡中心")]'
# 收卡中心列表
web_sk_sklb = By.XPATH, '//span[contains(text(),"收卡中心")]/../..'
# 接收卡种t-steam
web_sk_jk_jssteam = By.XPATH, '//span[contains(text(),"t-Steam")]'
# 接收卡种t-steam
web_sk_jk_jssephora = By.XPATH, '//span[contains(text(),"t-Sephora")]'
# 接卡
web_sk_jk_jk = By.XPATH, '//span[contains(text(),"接卡")]'
# 开始接卡
web_sk_jk_ksjk = By.XPATH, '//*[@id="cardQueue"]/div[1]/span[3]/span'
# 取消
web_sk_jk_qx = By.XPATH, '//*[@id="cardQueue"]/div[2]/div[3]/table/tbody/tr/td[11]/div/div/button[2]/span'
# 弹窗提示消息
web_sk_jk_tcts = By.XPATH, '//*[@id="swal2-title"]'
# 弹窗OK
web_sk_jk_tcok = By.XPATH, "//button[contains(text(),'OK')]"
# 查看卡密
web_sk_jk_ckkm = By.XPATH, "//span[contains(text(),'查看卡密')]"
# 代码
web_sk_jk_dm = By.XPATH, "//code[contains(text(),'代码')]"
# PIN
web_sk_jk_pin = By.XPATH, "//code[contains(text(),'PIN')]"
# 上传余额图
web_sk_jk_scye = By.XPATH, "//span[contains(text(),'上传余额图')]"
# 余额图提示
web_sk_jk_yetts = By.XPATH, "//p[contains(text(),'请上传余额反馈图')]"
# 余额图上传
web_sk_jk_yetsc = By.XPATH, "//div[@aria-label='上传余额反馈图']//div[contains(text(),'将文件拖到此处，或点击此区域后粘贴图片')]"
# 余额图提交
web_sk_jk_yettj = By.XPATH, "//div[@aria-label='上传余额反馈图']//span[contains(text(),'提交')]"
# 处理成功
web_sk_jk_clcg = By.XPATH, "//span[contains(text(),' 处理成功')]"
# 处理成功提交
web_sk_jk_cgtj = By.XPATH, "//div[@aria-label='确认处理成功']//span[contains(text(),'提交')]"
# 处理失败
web_sk_jk_clsb = By.XPATH, "//span[contains(text(),' 处理失败')]"
# 非礼品
web_sk_jk_flp = By.XPATH, "//span[contains(text(),'失败(非礼品卡图)')]"
# 设置失败
web_sk_jk_szsb = By.XPATH, "//button[contains(text(),'确定')]"
# 提交成功
web_sk_jk_tjcg = By.XPATH, "//button[normalize-space()='OK']"
# 失败原因
web_sk_jk_sbyy = By.XPATH, "//div[@aria-label='失败原因']//input[@placeholder='请选择']"
# 卡片信息有误
web_sk_jk_xxyw = By.XPATH, "//span[contains(text(),'卡片信息有误')]"
# 余额不足
web_sk_jk_yebz = By.XPATH, "//span[contains(text(),'余额不足')]"
# 卡种有误
web_sk_jk_kzyw = By.XPATH, "//span[contains(text(),'卡种有误')]"
# 其他
web_sk_jk_qt = By.XPATH, "//span[contains(text(),'其他')]"
# 失败图片
web_sk_jk_sbtp = By.XPATH, "//div[@aria-label='失败原因']//div[contains(text(),'将文件拖到此处，或点击此区域后粘贴图片')]"
# 图片提示
web_sk_jk_tpts = By.XPATH, "//div[contains(text(),'请上传失败图片')]"
# 失败提交
web_sk_jk_sbtj = By.XPATH, "//div[@aria-label='失败原因']//span[contains(text(),'提交')]"
# 修改卡种
web_sk_jk_xgkz = By.XPATH, "//span[contains(text(),' 修改卡种')]"
# 面值
web_sk_jk_mz = By.XPATH, "//label[contains(text(),'面值')]/..//input"
# 修改提交
web_sk_jk_xgtj = By.XPATH, "//div[@aria-label='修改卡种']//span[contains(text(),'提交')]"
# 修改提示
web_sk_jk_xgts = By.XPATH, "//p[contains(text(),'修改后价值低于原卡价值，请上传证明图片')]"
# 修改图片
web_sk_jk_xgtp = By.XPATH, "//div[@aria-label='修改卡种']//div[contains(text(),'将文件拖到此处，或点击此区域后粘贴图片')]"
# 修改成功
web_sk_jk_xgcg = By.XPATH, "//p[contains(text(),'修改成功')]"
# 延长时间
web_sk_jk_ycsj = By.XPATH, "//span[contains(text(),' 延长时间')]"
# 添加操作人
web_sk_jk_tjczr = By.XPATH, "//span[contains(text(),' 添加操作人')]"
# 压卡
web_sk_jk_yk = By.XPATH, "//span[contains(text(),' 压卡')]"
# 延长原因
web_sk_jk_ycyy = By.XPATH, '//textarea[@placeholder="输入延长时间原因"]'
# 延长提交
web_sk_jk_yctj = By.XPATH, "//div[@aria-label='延长时间设置']//span[contains(text(),'提交')]"
# 延长提示
web_sk_jk_ycts = By.XPATH, "//p[contains(text(),'您已超过了最大可延时次数')]"
# 延长取消
web_sk_jk_ycqx = By.XPATH, "//div[@aria-label='延长时间设置']//span[contains(text(),'取消')]"
# 操作人
web_sk_jk_czr = By.XPATH, "//div[@aria-label='添加操作人']//input[@placeholder='请选择']//..//i"
# test001用户
web_sk_jk_yh = By.XPATH, '//div[@x-placement="bottom-start"]//span[text()="test001"]'
# 添加提交
web_sk_jk_tjtj = By.XPATH, "//div[@aria-label='添加操作人']//span[contains(text(),'提交')]"
# 压卡时间
web_sk_jk_yksj = By.XPATH, '//input[@placeholder="输入压卡分钟数"]'
# 压卡提交
web_sk_jk_yktj = By.XPATH, "//div[@aria-label='压卡设置']//span[contains(text(),'提交')]"
# 卡片ID
web_sk_jk_id = By.CSS_SELECTOR, '.el-table__row>td:nth-child(1)>div'
# 面额
web_sk_jk_me = By.CSS_SELECTOR, '.el-table__row>td:nth-child(4)>div'
# 汇率
web_sk_jk_hl = By.CSS_SELECTOR, '.el-table__row>td:nth-child(5)>div'

"""
收卡-交易记录
"""
# 交易记录
web_sk_jy_jyjl = By.XPATH, '//span[contains(text(),"交易记录")]'
# 开始时间
web_sk_jy_kssj = By.XPATH, '//*[@id="created_at_start"]'
# 结束时间
web_sk_jy_jssj = By.XPATH, '//*[@id="created_at_end"]'
# 卡片ID
web_sk_jy_kpid = By.XPATH, '//td[@class="column-order_card_id"]'
# 金额
web_sk_jy_je = By.XPATH, '//td[@class="column-rmb_amount"]'
# 交易类型
web_sk_jy_jylx = By.XPATH, '//td[@class="column-type"]/span[@class="label label-success"]'
# 详情
web_sk_jy_xq = By.XPATH, '//td[@class="column-detail"]'
# 交易信息
web_sk_jy_jyxx = By.XPATH, '//td[@class="column-interpreter"]'
# 搜索
web_sk_jy_ss = By.XPATH, '//*[@id="filter-box"]/form/div[2]/div/div/div[2]/div[1]/button/i'
# 错误信息
web_sk_jy_cwxx = By.XPATH, "//*[contains(text(),'Exception')]"
# 交易id列表
web_sk_jy_jyid = By.XPATH, '//tr[@data-key]'
"""
收卡-卡片管理
"""
# 卡片管理
web_sk_kp_kpgl = By.XPATH, '//span[contains(text(),"卡片管理")]'
# 开始时间
web_sk_kp_kssj = By.XPATH, '//*[@id="created_at_start"]'
# 结束时间
web_sk_kp_jssj = By.XPATH, '//*[@id="created_at_end"]'
# 卡片ID列表
web_sk_kp_kpid = By.XPATH, '//tr[@data-key]'
# 卡密
web_sk_kp_km = By.XPATH, '//td[@class="column-scode"]'
# 面值
web_sk_kp_mz = By.XPATH, '//td[@class="column-balance"]'
# 汇率
web_sk_kp_hl = By.XPATH, '//td[@class="column-confirmed_queue-rmb_card_rate"]'
# 交易额
web_sk_kp_jye = By.XPATH, '//td[@class="column-rmb_balance"]'
# 状态
web_sk_kp_zt = By.XPATH, '//td[@class="column-status"]'
# 说明
web_sk_kp_sm = By.XPATH, '//td[@class="column-remark"]/span'
# 操作
web_sk_kp_cz = By.XPATH, '//td[@class="column-__actions__"]/div/a'
# 手动成功
web_sk_kp_sdcg = By.XPATH, '//td[@class="column-__actions__"]/div/ul/li/a'
# 提交
web_sk_kp_tj = By.XPATH, '/html/body/div[4]/div/div[3]/button[1]'
# 弹窗提示
web_sk_kp_tcts = By.XPATH, '//*[@id="swal2-title"]'
# OK
web_sk_kp_ok = By.XPATH, '/html/body/div[4]/div/div[3]/button[1]'

"""
出卡-平台顶部功能栏
"""
# 余额
web_ck_top_ye = By.CSS_SELECTOR, ".balance-box"
# 授信余额
web_ck_top_sxye = By.CSS_SELECTOR, ".credit-balance-box"
# 转账码
web_ck_top_zzm = By.XPATH, '(//button[@class="btn btn-sm btn-success"])[3]'
# 转账
web_ck_top_zz = By.XPATH, "(//a[contains(text(),'转账')])[1]"
# 去充值
web_ck_top_qcz = By.XPATH, "(//a[contains(text(),'去充值')])[1]"
# 刷新
web_ck_top_sx = By.XPATH, "(//i[@class='fa fa-refresh'])[1]"
# 头像
web_ck_top_tx = By.XPATH, "(//img[@class='user-image'])[1]"
# 设置
web_ck_top_sz = By.CSS_SELECTOR, ".user-footer>div>a"
# 登出
web_ck_top_dc = By.CSS_SELECTOR, ".user-footer>div:nth-child(2)>a"
# 转账码弹窗
web_ck_top_zzmtc = By.XPATH, '//*[@id="swal2-title"]'
# 公司名称+角色
web_ck_top_gsmc_js = By.XPATH, '/html/body/div[1]/header/a/span[2]'
# 转账码确认
web_ck_top_zzmqr = By.CSS_SELECTOR, 'body > div.swal2-container.swal2-center.swal2-fade.swal2-shown > div > div.swal2-actions > button.swal2-confirm.swal2-styled'

"""
出卡-转账页面
"""
# 获取文本输入框
web_ck_top_sr = By.XPATH, "//input[@type='text']"
# 收款人转账码
web_ck_top_skrzzm = By.XPATH, "//label[contains(text(),'收款人转账码')]/../div/div/input"
# 收款人
web_ck_top_skr = By.XPATH, "//*[@id='transfer-money']/form/div[2]/div"
# 金额
web_ck_top_je = By.XPATH, "//label[contains(text(),'金额')]/../div/div/input"
# 金额错误提示
web_ck_top_jecw = By.XPATH, '//*[@id="transfer-money"]/form/div[2]/div/div[2]'
# 备注
web_ck_top_bz = By.XPATH, "//label[contains(text(),'备注')]/../div/div/input"
# 立即转账
web_ck_top_ljzz = By.XPATH, '//span[text()="立即转账"]'
# 弹窗
web_ck_top_zztc = By.CSS_SELECTOR, '.el-message__content'
# 转账文字，用于失焦
web_ck_top_zzwz = By.XPATH, '//*[@id="app"]/section[1]/h1'
# 转账确定
web_ck_top_zzqd = By.XPATH, '//div[@aria-label="提示"]//span[contains(text(),"确定")]'
# 转账截图
web_ck_top_zzjt = By.XPATH, "//div[@class='el-upload__text']"

"""
出卡-用户设置编辑页面
"""
# 用户名
web_ck_top_yhm = By.XPATH, '//*[@id="app"]/section[2]/div/div/div/form/div[1]/div/div/div[1]/div/div/div'
# 名称
web_ck_top_mc = By.XPATH, '//*[@id="name"]'
# 头像

# 密码
web_ck_top_mm = By.XPATH, '//*[@id="password"]'
# 确认密码
web_ck_top_qrmm = By.XPATH, '//*[@id="password_confirmation"]'
# 提交
web_ck_top_tj = By.XPATH, '//*[@id="app"]/section[2]/div/div/div/form/div[2]/div[2]/div[1]/button'

# 弹窗
web_ck_top_sztc = By.CSS_SELECTOR, '.toast-message'

"""
出卡-人员管理
"""
# 跳转人员管理
web_ck_pm_rygl = By.XPATH, '//span[contains(text(),"人员管理")]'
# 新增
web_ck_pm_xz = By.XPATH, '//*[@id="app"]/section[2]/div/div/div/div[1]/div[1]/div[2]/a/span'
# 快速创建
web_ck_pm_kscj = By.XPATH, '//span[@class="create"]'
# 快速提交
web_ck_pm_kstj = By.XPATH, '//button[@class="btn btn-primary btn-sm"]'
# 编辑
web_ck_pm_bj = By.XPATH, '//a[text()="编辑"][1]'
# 显示
web_ck_pm_xs = By.XPATH, '//a[text()="显示"][1]'
# 删除
web_ck_pm_sc = By.XPATH, '//a[text()="删除"][1]'
# 用户名
web_ck_pm_username = By.CSS_SELECTOR, '#username'
# 名称
web_ck_pm_name = By.CSS_SELECTOR, '#name'
# 密码
web_ck_pm_pwd = By.CSS_SELECTOR, '#password'
# 角色
web_ck_pm_js = By.XPATH, "//span[@class='select2-selection__placeholder']"
# 卡商公司-员工
web_ck_pm_yg = By.XPATH, "//span[@class='select2-results']//li[contains(text(),'卡商公司-员工')]"
# 状态
web_ck_pm_zt = By.XPATH, "//span[@class='bootstrap-switch-handle-on bootstrap-switch-primary']"
# 分组
web_ck_pm_fz = By.XPATH, "//input[@placeholder='分组']"
# 新增提交
web_ck_pm_xztj = By.XPATH, '//button[text()="提交"]'
# 成功弹窗
web_ck_pm_cgtc = By.CSS_SELECTOR, '.toast-message'
# 编辑提交
web_ck_pm_bjtj = By.XPATH, '//button[text()="提交"]'
# 用户名_快速
web_ck_pm_usernameks = By.CSS_SELECTOR, '#name'
# 名称_快速
web_ck_pm_nameks = By.CSS_SELECTOR, '#username'
# 密码_快速
web_ck_pm_pwdks = By.CSS_SELECTOR, '#password'
# 角色_快速
web_ck_pm_jsks = By.XPATH, '//select[@name="roles"]'
# 页面总记录条数
web_ck_pm_total = By.XPATH, '//*[@id="app"]/section[2]/div/div/div/div[3]/b[3]'
# 用户名提示
web_ck_pm_usernamets = By.XPATH, '//*[@id="app"]/section[2]/div/div/div/form/div[1]/div/div/div[1]/div/label'
# 名称提示
web_ck_pm_namets = By.XPATH, '//*[@id="app"]/section[2]/div/div/div/form/div[1]/div/div/div[2]/div/label'
# 密码提示
web_ck_pm_pwdts = By.XPATH, '//*[@id="app"]/section[2]/div/div/div/form/div[1]/div/div/div[3]/div/label'
# 操作按钮
web_ck_pm_cz = By.XPATH, '//i[@class="fa fa-ellipsis-v"][1]'
# 删除提交按钮
web_ck_pm_sctj = By.XPATH, '//button[@class="swal2-confirm swal2-styled"]'
# 删除ok
web_ck_pm_scok = By.XPATH, '//button[@class="swal2-confirm swal2-styled"]'
# 删除成功
web_ck_pm_sccg = By.XPATH, '//*[@id="swal2-title"]'
# 分组列表
web_ck_pm_fzlb = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-groups']//span"

"""
出卡-总览
"""
# 总览
web_ck_zl_zl = By.XPATH, '//span[contains(text(),"总览")]'
# 公司名字
web_ck_zl_gsmz = By.XPATH, '//*[@id="app"]/section[1]/h1'
# 余额
web_ck_zl_ye = By.XPATH, '//*[@id="app"]/section[2]/div[1]/div/div/div[2]/div/div[1]'
# 今日利润
web_ck_zl_d3 = By.XPATH, '//*[@id="app"]/section[2]/div[2]/div[3]/div/div[1]/h3'
# 本月利润
web_ck_zl_d4 = By.XPATH, '//*[@id="app"]/section[2]/div[2]/div[4]/div/div[1]/h3'

"""
出卡-订单
"""

# 出卡中心
web_sk_ckzx = By.XPATH, '//span[contains(text(),"出卡中心")]'
# 出卡中心列表
web_sk_cklb = By.XPATH, '//span[contains(text(),"出卡中心")]/../..'
# +订单
web_ck_dd_jdd = By.XPATH, "//a[contains(text(),'+ 订单')]"
# 订单
web_ck_dd_dd = By.XPATH, "//span[contains(text(),'订单')]"
# 新增
web_ck_dd_xz = By.XPATH, "//span[contains(text(),'新增')]"
# 卡种-t-Steam
web_ck_dd_tSteam = By.XPATH, "//span[contains(text(),'t-Steam')]"
# 卡种-t-Sephora
web_ck_dd_tSephora = By.XPATH, "//span[contains(text(),'t-Sephora')]"
# 图片区域
web_ck_dd_tp = By.XPATH, "//div[contains(text(),'粘贴图片')]/../i"
# 确认发布
web_ck_dd_qrfb = By.XPATH, "//span[contains(text(),'确认发布')]"
# 卡密-代码
web_ck_dd_km = By.XPATH, "//input[@placeholder='代码']"
# 卡密-pin
web_ck_dd_pin = By.XPATH, "//input[@placeholder='PIN']"
# ok
web_ck_dd_ok = By.XPATH, "//button[normalize-space()='OK']"
# 添加卡片
web_ck_dd_tjkp = By.XPATH, "//span[contains(text(),'添加卡片')]"


# 卡种
def create_web_ck_dd_kz_selector(kz):
    return By.XPATH, f"//span[contains(text(), '{kz}')]"


# 面额
web_ck_dd_me = By.XPATH, "//div[@class='el-form-item is-required']//div[@class='el-input el-input--prefix']//input[@type='text']"
# 卡图
web_ck_dd_kt = By.XPATH, "//span[@class='el-radio-button__inner'][contains(text(),'卡图')]"
# 代码
web_ck_dd_dm = By.XPATH, "//span[contains(text(),'代码')]"
# 收据
web_ck_dd_sj = By.XPATH, "//label[@value='3']//span[@class='el-radio-button__inner'][contains(text(),'收据')]"
# 现金收据
web_ck_dd_xjsj = By.XPATH, "//span[contains(text(),'现金收据')]"
# 慢
web_ck_dd_m = By.XPATH, "//span[contains(text(),'慢')]"
# 快
web_ck_dd_k = By.XPATH, "//span[contains(text(),'快')]"

"""
出卡-回款
"""
# 回款管理
web_ck_hk_hkgl = By.XPATH, "//span[contains(text(),'回款管理')]"
# 余额
web_ck_hk_ye = By.CSS_SELECTOR, "div[class='box'] div[class='box-body']"
# 新增回款
web_ck_hk_xz = By.XPATH, "//span[contains(text(),'新增')]"
# 新增余额
web_ck_hk_xzye = By.XPATH, "//input[@id='balance_rmb']"
# 回款额度
web_ck_hk_hked = By.XPATH, "//input[@id='available_collection_balance']"
# 回款金额
web_ck_hk_hkje = By.XPATH, "//input[@id='amount_rmb']"
# 银行名
web_ck_hk_yhm = By.XPATH, "//input[@id='name']"
# 姓名
web_ck_hk_xm = By.XPATH, "//input[@id='account_name']"
# 卡号
web_ck_hk_kh = By.XPATH, "//input[@id='account_number']"
# 二维码
web_ck_hk_ewm = By.XPATH, "//input[@placeholder='选择/粘贴图片']"
# 备注
web_ck_hk_bz = By.XPATH, "//textarea[@placeholder='输入 备注']"
# 提交
web_ck_hk_tj = By.XPATH, "//button[@type='submit']"
# 回款待处理
web_ck_hk_hkdcl = By.XPATH, "//span[contains(text(),'回款待处理')]"
# 打款截图
web_ck_hk_dkjt = By.XPATH, "//th[@class='column-images']"
# 收款账号
web_ck_hk_skzh = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-collection_account']"
# 充值金额
web_ck_hk_czje = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-amount_rmb']"
# 状态
web_ck_hk_zt = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-status']"
# 操作
web_ck_hk_cz = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-__actions__']//i"
# 确认完成
web_ck_hk_qrwc = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-__actions__']//a[contains(text(),'确认完成')]"
# 确认失败
web_ck_hk_qrsb = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-__actions__']//a[contains(text(),'确认失败')]"
# 提交
web_ck_hk_qrtj = By.XPATH, "//button[@type='button'][contains(text(),'提交')]"
# 提交OK
web_ck_hk_tjok = By.XPATH, "//button[normalize-space()='OK']"

"""
出卡-卡图链接管理
"""
# 卡图链接管理页面
web_ck_lj_ktljym = By.XPATH, "//h1[contains(text(),'卡图链接管理')]"
# 卡密列表
web_ck_lj_kmlb = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-ecode']"
# 面额列表
web_ck_lj_melb = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-card_balance']"
# 网址列表
web_ck_lj_wzlb = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-access_url']"
# 备注列表
web_ck_lj_bzlb = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-notes']"
# 操作
web_ck_lj_cz = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-__actions__']//i"
# 编辑
web_ck_lj_bj = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-__actions__']//a[contains(text(),'编辑')]"
# 卡图链接管理
web_ck_lj_ktljgl = By.XPATH, "//span[contains(text(),'卡图链接管理')]"
# 新增
web_ck_lj_xz = By.XPATH, "//span[contains(text(),'新增')]"
# 卡密
web_ck_lj_km = By.XPATH, "//input[@id='ecode']"
# 面额
web_ck_lj_me = By.XPATH, "//input[@id='card_balance']"
# 卡图
web_ck_lj_kt = By.XPATH, "//input[@placeholder='选择/粘贴图片']"
# 备注
web_ck_lj_bz = By.XPATH, "//input[@id='notes']"
# 提交
web_ck_lj_tj = By.XPATH, "//button[@type='submit']"
# 查看卡图链接
web_ck_lj_ckktlj = By.XPATH, "//h1[contains(text(),'查看卡图链接')]"


# 查看卡密
def create_ck_lj_ckkm_selector(km):
    return By.XPATH, f"//input[@value='{km}']"


# 查看面额
def create_ck_lj_ckme_selector(me):
    return By.XPATH, f"//input[@value='{me}']"


"""
出卡-群组管理
"""
# 群组管理
web_ck_qz_qzgl = By.XPATH, "//span[contains(text(),'群组管理')]"
# 快速创建
web_ck_qz_kscj = By.XPATH, "//span[@class='create']"
# 名称
web_ck_qz_mc = By.XPATH, "//input[@id='name']"
# 提交
web_ck_qz_tj = By.XPATH, "//button[@class='btn btn-primary btn-sm']"
# 保存成功
web_ck_qz_bccg = By.XPATH, "//div[@class='toast-message']"
"""
出卡-卡密
"""
# 卡密
web_ck_km_km = By.XPATH, "//span[contains(text(),'卡密')]"
# 卡密管理
web_ck_km_kmgl = By.XPATH, "//h1[contains(text(),'卡密管理')]"
# 卡片id列表
web_ck_km_kpidlb = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-id']"
# 卡种列表
web_ck_km_kzlb = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-card-name']"
# 国家列表
web_ck_km_gjlb = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-country-lan_name']"
# 卡头列表
web_ck_km_ktlb = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-card_head-head_num']"
# 卡类列表
web_ck_km_kllb = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-card_type']"
# 代码列表
web_ck_km_dmlb = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-images']"
# 面额列表
web_ck_km_melb = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-balance']"
# 汇率列表
web_ck_km_hllb = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-rmb_rate']"
# 交易额列表
web_ck_km_jyelb = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-rmb_balance']"
# 佣金列表
web_ck_km_yjlb = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-transaction_fee']"
# 收入列表
web_ck_km_srlb = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-income']"
# 状态列表
web_ck_km_ztlb = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-status']"
# 说明列表
web_ck_km_smlb = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-remark']//span"

"""
收卡-交易记录
"""
# 交易记录
web_ck_jy_jyjl = By.XPATH, '//span[contains(text(),"交易记录")]'
# 开始时间
web_ck_jy_kssj = By.XPATH, '//*[@id="created_at_start"]'
# 结束时间
web_ck_jy_jssj = By.XPATH, '//*[@id="created_at_end"]'
# 卡片ID
web_ck_jy_kpid = By.XPATH, '//td[@class="column-order_card_id"]'
# 金额
web_ck_jy_je = By.XPATH, '//td[@class="column-rmb_amount"]'
# 交易类型
web_ck_jy_jylx = By.XPATH, '//td[@class="column-type"]/span[@class="label label-success"]'
# 详情
web_ck_jy_xq = By.XPATH, '//td[@class="column-detail"]'
# 交易信息
web_ck_jy_jyxx = By.XPATH, '//td[@class="column-interpreter"]'
# 搜索
web_ck_jy_ss = By.XPATH, '//*[@id="filter-box"]/form/div[2]/div/div/div[2]/div[1]/button/i'
# 错误信息
web_ck_jy_cwxx = By.XPATH, "//*[contains(text(),'Exception')]"
# 交易id列表
web_ck_jy_jyid = By.XPATH, '//td[@class="column-id"]'

"""
卡商管理-卡密
"""
# 编辑面额
web_gl_km_bjme = By.XPATH, "//input[@id='balance']"
# 编辑汇率
web_gl_km_bjhl = By.XPATH, "//input[@id='final_rmb_rate']"
# 编辑总金额
web_gl_km_bjzje = By.XPATH, "//input[@id='total_balance']"
# 编辑提交
web_gl_km_bjtj = By.XPATH, "//button[@type='submit']"
# 卡片id列表
web_gl_km_kpidlb = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-id']"


# 对应卡片id的编辑按钮
def create_web_gl_km_bj_selector(card_id):
    return By.XPATH, f"//td[normalize-space()='{card_id}']/../td[@class='column-__actions__']/div/a"


# 对应卡片id的手动成功按钮
def create_web_gl_km_sdcg_selector(card_id):
    return By.XPATH, f"//td[normalize-space()='{card_id}']/../td[@class='column-__actions__']/div/ul//a[contains(text(),'手动成功')]"


# 对应卡片id的关闭订单按钮
def create_web_gl_km_gbdd_selector(card_id):
    return By.XPATH, f"//td[normalize-space()='{card_id}']/../td[@class='column-__actions__']/div/ul//a[contains(text(),'关闭订单')]"


# 成功提交
web_gl_km_cgtj = By.XPATH, "//button[@type='button'][normalize-space()='Submit']"

# 操作完成
web_gl_km_czwc = By.XPATH, "//button[normalize-space()='OK']"

"""
出卡-代付
"""
# + 代付
web_ck_df_jdf = By.XPATH, "//a[contains(text(),'+ 代付')]"
# 银行
web_ck_df_yh = By.XPATH, "//input[@id='settlement_bank_name']"
# 户名
web_ck_df_hm = By.XPATH, "//input[@id='settlement_bank_account']"
# 卡号
web_ck_df_kh = By.XPATH, "//input[@id='settlement_bank_number']"
# 金额（奈拉）
web_ck_df_je = By.XPATH, "//input[@id='amount']"
# 提交
web_ck_df_tj = By.XPATH, "//button[@type='submit']"
# 代付
web_ck_df_df = By.XPATH, "//span[contains(text(),'代付')]"
# 操作
web_ck_df_cz = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-__actions__']//i"
# 申请退款
web_ck_df_sqtk = By.XPATH, "//table[@class='table table-hover grid-table']//tbody//td[@class='column-__actions__']//a[contains(text(),'申请退款')]"
# 退款提交
web_ck_df_tktj = By.XPATH, "//button[@type='button'][contains(text(),'提交')]"
# 操作完成
web_ck_df_czwc = By.XPATH, "//button[normalize-space()='OK']"
# 代付管理
web_ck_df_dfgl = By.XPATH,"//h1[contains(text(),'代付管理')]"

"""
代付-代付交易处理 
"""
# 语言选择
web_df_yy = By.XPATH, "//select[@name='language']"
# 代付交易处理
web_df_jd_dfjycl = By.XPATH, "//span[contains(text(),'代付交易处理')]"
# 开始接单
web_df_jd_ksjd = By.XPATH, "//span[contains(text(),'开始接单')]"
# 确认成功
web_df_jd_qrcg = By.XPATH, "//div[@class='cell']//span[contains(text(),'确认成功')]"
# 确认失败
web_df_jd_qrsb = By.XPATH, "//div[contains(@class,'cell')]//span[contains(text(),'确认失败')]"
# 成功图片
web_df_jd_cgtp = By.XPATH, "//i[contains(@class,'el-icon-upload')]"
# 成功提交
web_df_jd_cgtj = By.XPATH, "//div[@aria-label='确认处理成功']//span[contains(text(),'提交')]"
# 确认查看
web_df_jd_qrck = By.XPATH, "//div[@class='cell']//span[contains(text(),'确认查看')]"
# 取消
web_df_jd_qx = By.XPATH, "//div[contains(@class,'cell')]//span[contains(@class,'el-popover__reference-wrapper')]//span[contains(text(),'取消')]"
# 失败备注
web_df_jd_sbbz = By.XPATH, "//input[@type='text']"
# 失败提交
web_df_jd_sbtj = By.XPATH, "//div[@aria-label='确认处理失败']//span[contains(text(),'提交')]"
# 处理退款请求
web_df_jd_cltkqq = By.XPATH, "//div[@class='cell']//span[contains(text(),'处理退款请求')]"
# 拒绝退款
web_df_jd_jjtk = By.XPATH, "//span[contains(text(),'支付成功，拒绝退款')]"
# 同意退款
web_df_jd_tytk = By.XPATH, "//span[contains(text(),'支付失败，同意退款')]"
# 退款说明
web_df_jd_tksm = By.XPATH, "//textarea[@class='el-textarea__inner']"
# 退款图片
web_df_jd_tktp = By.XPATH, "//i[@class='el-icon-upload']"
# 退款提交
web_df_jd_tktj = By.XPATH, "//div[@aria-label='处理退款请求']//span[contains(text(),'提交')]"

"""
代付-导航 
"""
web_df_top_sx = By.XPATH, "//i[@class='fa fa-refresh']"
